﻿using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 考试学科基础输入参数
    /// </summary>
    public class KaoshiXuekeBaseInput
    {
        /// <summary>
        /// 考试
        /// </summary>
        public virtual long KaoshiId { get; set; }
        
        /// <summary>
        /// 学科
        /// </summary>
        public virtual long XuekeId { get; set; }

    /// <summary>
    /// 开始时间
    /// </summary>
    public virtual DateTime? StartShijian { get; set; }

    /// <summary>
    /// 结束时间
    /// </summary>
    public virtual DateTime? EndShijian { get; set; }

    /// <summary>
    /// 权重
    /// </summary>
    public virtual double? Quanzhong { get; set; }
        
        /// <summary>
        /// 总分
        /// </summary>
        public virtual double? Zongfen { get; set; }
        
        /// <summary>
        /// 备注
        /// </summary>
        public virtual string? Beizhu { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }

    /// <summary>
    /// 序号
    /// </summary>
    public virtual int Index { get; set; }
}

    /// <summary>
    /// 考试学科分页查询输入参数
    /// </summary>
    public class KaoshiXuekeInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 考试
        /// </summary>
        public long? KaoshiId { get; set; }
        
        /// <summary>
        /// 学科
        /// </summary>
        public long? XuekeId { get; set; }

    /// <summary>
    /// 开始时间
    /// </summary>
    public DateTime? StartShijian { get; set; }

    /// <summary>
    /// 结束时间
    /// </summary>
    public DateTime? EndShijian { get; set; }

    /// <summary>
    /// 时间范围
    /// </summary>
    public List<DateTime?> ShijianRange { get; set; } 
        /// <summary>
        /// 权重
        /// </summary>
        public double? Quanzhong { get; set; }
        
        /// <summary>
        /// 总分
        /// </summary>
        public double? Zongfen { get; set; }
        
        /// <summary>
        /// 备注
        /// </summary>
        public string? Beizhu { get; set; }
        
    }

    /// <summary>
    /// 考试学科增加输入参数
    /// </summary>
    public class AddKaoshiXuekeInput : KaoshiXuekeBaseInput
    {
        /// <summary>
        /// 考试
        /// </summary>
        [Required(ErrorMessage = "考试不能为空")]
        public override long KaoshiId { get; set; }
        
        /// <summary>
        /// 学科
        /// </summary>
        [Required(ErrorMessage = "学科不能为空")]
        public override long XuekeId { get; set; }
        
    }

    /// <summary>
    /// 考试学科删除输入参数
    /// </summary>
    public class DeleteKaoshiXuekeInput : BaseIdInput
    {
    }

    /// <summary>
    /// 考试学科更新输入参数
    /// </summary>
    public class UpdateKaoshiXuekeInput : KaoshiXuekeBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 考试学科主键查询输入参数
    /// </summary>
    public class QueryByIdKaoshiXuekeInput : DeleteKaoshiXuekeInput
    {

    }

/// <summary>
/// 考试学科更新输入参数
/// </summary>
public class SaveKaoshiXuekeInput
{
    [Required(ErrorMessage = "考试Id不能为空")]
    public long KaoshiId { get; set; }

    public List<UpdateKaoshiXuekeInput> data { get; set; }

}